std::basic_string::c_str
From Cppreference
< cpp | string | basic string
| const CharT* c_str() const;
| ||
Returns pointer to a null-terminated character array with data equivalent to those stored in the string. Specifically the pointer is such that range [data(); data() + size()) is a valid.
Contents |
Parameters
(none)
Return value
pointer to the a null-terminated character string with the data of the string.
Complexity
constant.
See also
| accesses the first character (public member function) | ||
| accesses the last character (public member function) | ||
| returns a pointer to the first character of a string (public member function) | ||